package com.bsoft.gol.hcs.specialist.entity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by ChenJij on 2021/10/25.
 */
@Entity
@Table(name = "fus_answer_drug_info")
public class FusAnswerDrugInfo {
    private long fusAnswerDrugInfoId;
    private String userInfoId;
    private String titleId;
    private Date createTime;
    private String patientId;
    private String cardType;
    private String cardNumber;
    private String patientMedicalCardNumber;
    private Integer patientMedicalCardType;
    private String prescriptionId;
    private String drugsNumber;
    private String drugName;
    private String drugUsePathwaysCode;
    private String drugUsePathwaysName;
    private String drugUsingRate;
    private String drugUsingRateName;
    private Double onceDosage;
    private String dosageUnit;
    private Integer medicineDays;
    private Double drugSendNumber;
    private BigDecimal price;
    private String drugstoreUnit;
    private String drugSpecifications;
    private long diseaseTypeId;
    private String diseaseTypeName;
    private Date answerTime;
    private String reportId;

    @Id
    @Column(name = "fus_answer_drug_info_id")
    public long getFusAnswerDrugInfoId() {
        return fusAnswerDrugInfoId;
    }

    public void setFusAnswerDrugInfoId(long fusAnswerDrugInfoId) {
        this.fusAnswerDrugInfoId = fusAnswerDrugInfoId;
    }

    @Basic
    @Column(name = "user_info_id")
    public String getUserInfoId() {
        return userInfoId;
    }

    public void setUserInfoId(String userInfoId) {
        this.userInfoId = userInfoId;
    }

    @Basic
    @Column(name = "title_id")
    public String getTitleId() {
        return titleId;
    }

    public void setTitleId(String titleId) {
        this.titleId = titleId;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "patient_id")
    public String getPatientId() {
        return patientId;
    }

    public void setPatientId(String patientId) {
        this.patientId = patientId;
    }

    @Basic
    @Column(name = "card_type")
    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    @Basic
    @Column(name = "card_number")
    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    @Basic
    @Column(name = "patient_medical_card_number")
    public String getPatientMedicalCardNumber() {
        return patientMedicalCardNumber;
    }

    public void setPatientMedicalCardNumber(String patientMedicalCardNumber) {
        this.patientMedicalCardNumber = patientMedicalCardNumber;
    }

    @Basic
    @Column(name = "patient_medical_card_type")
    public Integer getPatientMedicalCardType() {
        return patientMedicalCardType;
    }

    public void setPatientMedicalCardType(Integer patientMedicalCardType) {
        this.patientMedicalCardType = patientMedicalCardType;
    }

    @Basic
    @Column(name = "prescription_id")
    public String getPrescriptionId() {
        return prescriptionId;
    }

    public void setPrescriptionId(String prescriptionId) {
        this.prescriptionId = prescriptionId;
    }

    @Basic
    @Column(name = "drugs_number")
    public String getDrugsNumber() {
        return drugsNumber;
    }

    public void setDrugsNumber(String drugsNumber) {
        this.drugsNumber = drugsNumber;
    }

    @Basic
    @Column(name = "drug_name")
    public String getDrugName() {
        return drugName;
    }

    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }

    @Basic
    @Column(name = "drug_use_pathways_code")
    public String getDrugUsePathwaysCode() {
        return drugUsePathwaysCode;
    }

    public void setDrugUsePathwaysCode(String drugUsePathwaysCode) {
        this.drugUsePathwaysCode = drugUsePathwaysCode;
    }

    @Basic
    @Column(name = "drug_use_pathways_name")
    public String getDrugUsePathwaysName() {
        return drugUsePathwaysName;
    }

    public void setDrugUsePathwaysName(String drugUsePathwaysName) {
        this.drugUsePathwaysName = drugUsePathwaysName;
    }

    @Basic
    @Column(name = "drug_using_rate")
    public String getDrugUsingRate() {
        return drugUsingRate;
    }

    public void setDrugUsingRate(String drugUsingRate) {
        this.drugUsingRate = drugUsingRate;
    }

    @Basic
    @Column(name = "drug_using_rate_name")
    public String getDrugUsingRateName() {
        return drugUsingRateName;
    }

    public void setDrugUsingRateName(String drugUsingRateName) {
        this.drugUsingRateName = drugUsingRateName;
    }

    @Basic
    @Column(name = "once_dosage")
    public Double getOnceDosage() {
        return onceDosage;
    }

    public void setOnceDosage(Double onceDosage) {
        this.onceDosage = onceDosage;
    }

    @Basic
    @Column(name = "dosage_unit")
    public String getDosageUnit() {
        return dosageUnit;
    }

    public void setDosageUnit(String dosageUnit) {
        this.dosageUnit = dosageUnit;
    }

    @Basic
    @Column(name = "medicine_days")
    public Integer getMedicineDays() {
        return medicineDays;
    }

    public void setMedicineDays(Integer medicineDays) {
        this.medicineDays = medicineDays;
    }

    @Basic
    @Column(name = "drug_send_number")
    public Double getDrugSendNumber() {
        return drugSendNumber;
    }

    public void setDrugSendNumber(Double drugSendNumber) {
        this.drugSendNumber = drugSendNumber;
    }

    @Basic
    @Column(name = "price")
    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Basic
    @Column(name = "drugstore_unit")
    public String getDrugstoreUnit() {
        return drugstoreUnit;
    }

    public void setDrugstoreUnit(String drugstoreUnit) {
        this.drugstoreUnit = drugstoreUnit;
    }

    @Basic
    @Column(name = "drug_specifications")
    public String getDrugSpecifications() {
        return drugSpecifications;
    }

    public void setDrugSpecifications(String drugSpecifications) {
        this.drugSpecifications = drugSpecifications;
    }

    @Basic
    @Column(name = "disease_type_id")
    public long getDiseaseTypeId() {
        return diseaseTypeId;
    }

    public void setDiseaseTypeId(long diseaseTypeId) {
        this.diseaseTypeId = diseaseTypeId;
    }

    @Basic
    @Column(name = "disease_type_name")
    public String getDiseaseTypeName() {
        return diseaseTypeName;
    }

    public void setDiseaseTypeName(String diseaseTypeName) {
        this.diseaseTypeName = diseaseTypeName;
    }

    @Basic
    @Column(name = "answer_time")
    public Date getAnswerTime() {
        return answerTime;
    }

    public void setAnswerTime(Date answerTime) {
        this.answerTime = answerTime;
    }

    @Basic
    @Column(name = "report_id")
    public String getReportId() {
        return reportId;
    }

    public void setReportId(String reportId) {
        this.reportId = reportId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof FusAnswerDrugInfo)) return false;

        FusAnswerDrugInfo that = (FusAnswerDrugInfo) o;

        if (fusAnswerDrugInfoId != that.fusAnswerDrugInfoId) return false;
        if (diseaseTypeId != that.diseaseTypeId) return false;
        if (userInfoId != null ? !userInfoId.equals(that.userInfoId) : that.userInfoId != null) return false;
        if (titleId != null ? !titleId.equals(that.titleId) : that.titleId != null) return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        if (patientId != null ? !patientId.equals(that.patientId) : that.patientId != null) return false;
        if (cardType != null ? !cardType.equals(that.cardType) : that.cardType != null) return false;
        if (cardNumber != null ? !cardNumber.equals(that.cardNumber) : that.cardNumber != null) return false;
        if (patientMedicalCardNumber != null ? !patientMedicalCardNumber.equals(that.patientMedicalCardNumber) : that.patientMedicalCardNumber != null)
            return false;
        if (patientMedicalCardType != null ? !patientMedicalCardType.equals(that.patientMedicalCardType) : that.patientMedicalCardType != null)
            return false;
        if (prescriptionId != null ? !prescriptionId.equals(that.prescriptionId) : that.prescriptionId != null)
            return false;
        if (drugsNumber != null ? !drugsNumber.equals(that.drugsNumber) : that.drugsNumber != null) return false;
        if (drugName != null ? !drugName.equals(that.drugName) : that.drugName != null) return false;
        if (drugUsePathwaysCode != null ? !drugUsePathwaysCode.equals(that.drugUsePathwaysCode) : that.drugUsePathwaysCode != null)
            return false;
        if (drugUsePathwaysName != null ? !drugUsePathwaysName.equals(that.drugUsePathwaysName) : that.drugUsePathwaysName != null)
            return false;
        if (drugUsingRate != null ? !drugUsingRate.equals(that.drugUsingRate) : that.drugUsingRate != null)
            return false;
        if (drugUsingRateName != null ? !drugUsingRateName.equals(that.drugUsingRateName) : that.drugUsingRateName != null)
            return false;
        if (onceDosage != null ? !onceDosage.equals(that.onceDosage) : that.onceDosage != null) return false;
        if (dosageUnit != null ? !dosageUnit.equals(that.dosageUnit) : that.dosageUnit != null) return false;
        if (medicineDays != null ? !medicineDays.equals(that.medicineDays) : that.medicineDays != null) return false;
        if (drugSendNumber != null ? !drugSendNumber.equals(that.drugSendNumber) : that.drugSendNumber != null)
            return false;
        if (price != null ? !price.equals(that.price) : that.price != null) return false;
        if (drugstoreUnit != null ? !drugstoreUnit.equals(that.drugstoreUnit) : that.drugstoreUnit != null)
            return false;
        if (drugSpecifications != null ? !drugSpecifications.equals(that.drugSpecifications) : that.drugSpecifications != null)
            return false;
        if (diseaseTypeName != null ? !diseaseTypeName.equals(that.diseaseTypeName) : that.diseaseTypeName != null)
            return false;
        if (answerTime != null ? !answerTime.equals(that.answerTime) : that.answerTime != null) return false;
        return reportId != null ? reportId.equals(that.reportId) : that.reportId == null;
    }

    @Override
    public int hashCode() {
        int result = (int) (fusAnswerDrugInfoId ^ (fusAnswerDrugInfoId >>> 32));
        result = 31 * result + (userInfoId != null ? userInfoId.hashCode() : 0);
        result = 31 * result + (titleId != null ? titleId.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (patientId != null ? patientId.hashCode() : 0);
        result = 31 * result + (cardType != null ? cardType.hashCode() : 0);
        result = 31 * result + (cardNumber != null ? cardNumber.hashCode() : 0);
        result = 31 * result + (patientMedicalCardNumber != null ? patientMedicalCardNumber.hashCode() : 0);
        result = 31 * result + (patientMedicalCardType != null ? patientMedicalCardType.hashCode() : 0);
        result = 31 * result + (prescriptionId != null ? prescriptionId.hashCode() : 0);
        result = 31 * result + (drugsNumber != null ? drugsNumber.hashCode() : 0);
        result = 31 * result + (drugName != null ? drugName.hashCode() : 0);
        result = 31 * result + (drugUsePathwaysCode != null ? drugUsePathwaysCode.hashCode() : 0);
        result = 31 * result + (drugUsePathwaysName != null ? drugUsePathwaysName.hashCode() : 0);
        result = 31 * result + (drugUsingRate != null ? drugUsingRate.hashCode() : 0);
        result = 31 * result + (drugUsingRateName != null ? drugUsingRateName.hashCode() : 0);
        result = 31 * result + (onceDosage != null ? onceDosage.hashCode() : 0);
        result = 31 * result + (dosageUnit != null ? dosageUnit.hashCode() : 0);
        result = 31 * result + (medicineDays != null ? medicineDays.hashCode() : 0);
        result = 31 * result + (drugSendNumber != null ? drugSendNumber.hashCode() : 0);
        result = 31 * result + (price != null ? price.hashCode() : 0);
        result = 31 * result + (drugstoreUnit != null ? drugstoreUnit.hashCode() : 0);
        result = 31 * result + (drugSpecifications != null ? drugSpecifications.hashCode() : 0);
        result = 31 * result + (int) (diseaseTypeId ^ (diseaseTypeId >>> 32));
        result = 31 * result + (diseaseTypeName != null ? diseaseTypeName.hashCode() : 0);
        result = 31 * result + (answerTime != null ? answerTime.hashCode() : 0);
        result = 31 * result + (reportId != null ? reportId.hashCode() : 0);
        return result;
    }
}